<template>
  <view class="container">
    <WeatherForecast />
    <view class="page-title">最新资讯</view>
    <TopNewsCard 
      v-for="(news, index) in newsList" 
      :key="index" 
      :news="news" 
    />
  </view>
</template>

<script>
import WeatherForecast from '../../../../../components/WeatherForecast.vue';
import TopNewsCard from '../../../../../components/TopNewsCard.vue';

export default {
  components: {
    WeatherForecast,
    TopNewsCard
  },
  data() {
    return {
      newsList: [
        {
          title: "党的二十届四中全会公报学习手账：为基本实现社会主义现代化而共同奋斗",
          source: "人民日报",
          comments: "5.2万",
          time: "2025.10.25",
          isTop: true,
          mode: 2,
          imagelist: ["/static/news1.png"]
        },
        {
          title: "聚焦高质量发展：各地积极落实新发展理念",
          source: "新华社",
          comments: "4.7万",
          time: "2025.10.24",
          isTop: true,
          mode: 2,
          imagelist: ["/static/quanzhou/city1.png"]
        },
        {
          title: "乡村振兴新实践：特色产业带动农民增收",
          source: "光明日报",
          comments: "2.3万",
          time: "2025.10.25",
          isTop: false,
          mode: 2,
          imagelist: ["/static/news3.png"]
        },
        {
          title: "加微信交友群，喜欢就聊，找喜欢的人",
          source: "我主良缘文化",
          comments: 0,
          time: "2025.10.08 09:50",
          isTop: false,
          mode: 3,
          imagelist: [
            "/static/quanzhou/city1.png",
            "/static/quanzhou/city2.jpg",
            "/static/quanzhou/city3.jpg"
          ]
        }
      ]
    };
  }
};
</script>

<style scoped>
.container {
  padding: 16rpx 24rpx;
  background-color: #f9f9f9;
  min-height: 100vh;
}
.page-title {
  font-size: 36rpx;
  font-weight: bold;
  padding: 20rpx 0;
  color: #1a1a1a;
}
</style>